PHYS 341 Mechanics -- HW 1 Solutions

In [11]:
%matplotlib inline 
%config InlineBackend.figure_format='retina'

from IPython.display import Image
import matplotlib.pyplot as plt
import matplotlib.path as mpath
import matplotlib.lines as mlines
import matplotlib.patches as mpatches
from matplotlib.collections import PatchCollection
import numpy as np

from JSAnimation.IPython_display import display_animation
from matplotlib import animation
In [12]:
def draw_coordinate_axes(ax, origin=(0, 0), dimensions=2, size=1, fontsize=24, 
                         length=1, axis_label='', color='k', alpha=1):
    #Remove standard axes
    ax.set_axis_off()
    
    ax.set_xlim([-size, size])
    ax.set_ylim([-size, size])
    
    #add arrows
    ax.annotate(s='', xy=(origin[0], origin[1] + length), xytext=origin, 
                arrowprops=dict(facecolor=color, width=2, alpha=alpha))
    ax.annotate(s='', xy=(origin[0] + length, origin[1]), xytext=origin, 
                arrowprops=dict(facecolor=color, width=2, alpha=alpha))
      
    #Add the vector labels
    if(dimensions == 2):
        ax.text(origin[0] + length, origin[1], "$\\hat{x}%s$" % axis_label, fontsize=fontsize, color=color)
        ax.text(origin[0], origin[1] + length, "$\\hat{y}%s$" % axis_label, fontsize=fontsize, color=color)

    elif(dimensions == 3):
        ax.annotate(s='', xy=(origin[0] - length*np.cos(45.), origin[1] - length*np.sin(45.)), xytext=origin, 
                    arrowprops=dict(facecolor=color, width=2, alpha=alpha))
        
        ax.text(origin[0] + length, origin[1], "$\\hat{y}%s$" % axis_label, fontsize=fontsize, color=color)
        ax.text(origin[0], origin[1] + length, "$\\hat{z}%s$" % axis_label, fontsize=fontsize, color=color)
        ax.text(origin[0] - length*np.cos(45.) - 0.15, origin[1] - length*np.sin(45.) - 0.15, 
                "$\\hat{x}%s$" % axis_label, 
                fontsize=fontsize, color=color)

1.1

$\vec{b} = \hat{x} + \hat{y}, \vec{c} = \hat{x} + \hat{z}$.

$\vec{b} + \vec{c} = \left( \hat{x} + \hat{y} \right) + \left( \hat{x} + \hat{z} \right) = 2 \hat{x} + \hat{y} + \hat{z}$.

$5 \vec{b} + 2 \vec{c} = 5 \left( \hat{x} + \hat{y} \right) + 2 \left( \hat{x} + \hat{z} \right) = 7 \hat{x} + 5 \hat{y} + 2 \hat{z}$.

$\vec{b} \bullet \vec{c} = \left( \hat{x} + \hat{y} \right) \cdot \left( \hat{x} + \hat{z} \right) = \hat{x} \cdot \hat{x} + \hat{x} \cdot \hat{z} + \hat{y} \cdot \hat{x} + \hat{y} \cdot \hat{z} = 1 + 0 + 0 + 0 = 1$.

Use the right-hand rule to calculate each term in this next expression:
$\vec{b} \times \vec{c} = \left( \hat{x} + \hat{y} \right) \times \left( \hat{x} + \hat{z} \right) = \hat{x} \times \hat{x} + \hat{x} \times \hat{z} + \hat{y} \times \hat{x} + \hat{y} \times \hat{z} = 0 - \hat{y} - \hat{z} + \hat{x}$.

1.2

Basically the same thing as above, but instead using the $(x, y, z)$ notation for the vectors instead of the $\hat{x}$ notation, so, for example:
$\vec{b} + \vec{c} = (1, 2, 3) + (3, 2, 1) = \left( 1 \hat{x} + 2 \hat{y} + 3 \hat{z} \right) + \left( 3 \hat{x} + 2 \hat{y} + 1 \hat{z} \right) = 4 \left( \hat{x} + \hat{y} + \hat{z} \right) = (4, 4, 4)$.

$5 \vec{b} - 2 \vec{c} = (-1, 6, 13)$.

$\vec{b} \bullet \vec{c} = 3 + 4 + 3 = 10$.

For this last one, it might be easier to visualize the cross-product using what is apparently called Sarrus' Rule:
$$ \vec{b} \times \vec{c} = \begin{vmatrix} \hat{x} & \hat{y} & \hat{z}\ \\ 1 & 2 & 3 \\ 3 & 2 & 1 \\ \end{vmatrix} = (-4, 8, -4). $$

1.3

Eqns (1.6) and (1.7) say $\vec{r} \bullet \vec{s} = |\vec{r}| |\vec{s}| \cos \theta = \sum_{i} r_{\rm i} s_{\rm i}$, so

$\vec{r} \bullet \vec{r} = |\vec{r}| |\vec{r}| \cos(0) = r^2 = \sum_{i} r_{\rm i} r_{\rm i} = x^2 + y^2 + z^2.$

1.4

Eqns (1.6) and (1.7) again: $\vec{r} \bullet \vec{s} = |\vec{r}| |\vec{s}| \cos \theta = \sum_{i} r_{\rm i} s_{\rm i}$, so $\cos \theta = \dfrac{\sum_{i} r_{\rm i} s_{\rm i}}{|\vec{r}| |\vec{s}|}$.

$\cos \theta = \dfrac{(1 \cdot 4) + (2 \cdot 2) + (4 \cdot 1)}{\sqrt{1^2 + 2^2 + 4^2} \cdot \sqrt{4^2 + 2^2 + 1^2}} = \dfrac{12}{21} = \dfrac{4}{7} \Rightarrow \theta = \arccos\left( \dfrac{4}{7} \right) \approx 55^\circ$.

*1.5

In [13]:
Image(filename='HW1_Fig1p5.jpg', width=300)
Out[13]:

Again, $\cos(\theta) = \dfrac{\vec{b} \bullet \vec{f}}{|\vec{b}| \ |\vec{f}|}$.

$\vec{b}$ must have equal components along all three unit directions, $x$, $y$, and $z$, though. So $\vec{b} = \left( \hat{x} + \hat{y} + \hat{z}\right) = \left( \hat{x} + \hat{y} + \hat{z} \right)$, and $|\vec{b}| = \sqrt{3}$.

Similarly for $\vec{f}$, except it has components only along $x$ and $z$ (as shown above): $\vec{f} = \left( \hat{x} + \hat{z} \right)= \left( \hat{x} + \hat{z}\right)$, and $|\vec{f}| = \sqrt{2}$.

Then applying Eqns (1.6) and (1.7): $\cos(\theta) = \dfrac{\vec{b} \bullet \vec{f}}{|\vec{b}| \ |\vec{f}|} = \dfrac{\left(\hat{x} + \hat{y} + \hat{z} \right) \bullet \left( \hat{x} + \hat{z} \right)}{\sqrt{3}\ \sqrt{2}} = 2/\sqrt{6} \Rightarrow \theta = \arccos \left(2/\sqrt{6} \right) \approx 35^\circ$.

1.6

$\vec{b} = \hat{x} + s\hat{y}$ and $\vec{c} = \hat{x} - s\hat{y}$.

To be orthogonal, $\vec{b} \bullet \vec{c} = 1 - s^2 = 0$, so $s = \pm 1$. The illustration below shows the case for $s = +1$.

In [14]:
Image(filename='HW1_Fig1p6.jpg', width=300)
Out[14]:

1.7

In [15]:
Image(filename='HW1_Fig1p7.jpg', width=600)
Out[15]:

If we choose a coordinate system, $(x, y, z)$ such that $\hat{x}$ runs parallel to $\vec{r}$, then $\vec{r} = r \hat{x}$. $\vec{s}$ is some other vector with an arbitrary orientation relative to $\vec{r}$, however: $\vec{s} = s_{\rm x} \hat{x} + s_{\rm y} \hat{y} + s_{\rm z} \hat{z}$, and $|\vec{s}| = \sqrt{s_{\rm x}^2 + s_{\rm y}^2 + s_{\rm z}^2}$. The left figure above illustrates this geometry.

Using this definition, $\vec{r} \bullet \vec{s} = r\ s_{\rm x}$, so now we need to show that $s_{\rm x} = s\ \cos(\theta)$. Rotating the coordinate system in the left panel above a bit gives us the right panel. If $|\vec{s}|$ is the hypoteneuse of a right triangle and the adjacent of that triangle runs parallel to $\hat{x}$ and therefore to $\vec{r}$, then clearly $s_{\rm x} = s\ \cos(\theta)$. Thus $r\ s_{\rm x} = |\vec{r}|\ |\vec{s}| \cos(\theta)$. Choosing $\vec{r}$ to run parallel to either $\hat{y}$ or $\hat{z}$ wouldn't change this result at all.

Also, having $\vec{r}$ run along none of the coordinate vectors (as is usually the case) wouldn't change the result either since we could always express the coordinate vectors themselves in terms of another coordinate system where one unit vector ran parallel to $\vec{r}$ (and the other two pointed in perpendicular directions).

1.8

(a) $\vec{u} + \vec{v} = \left( u_{\rm x} + v_{\rm x} \right) \hat{x} + \left( u_{\rm y} + v_{\rm y} \right) \hat{y} + \left( u_{\rm z} + v_{\rm z} \right) \hat{z}$. Then

$\vec{r} \bullet \left(\vec{u} + \vec{v}\right) = r_{\rm x} \left( u_{\rm x} + v_{\rm x} \right) + r_{\rm y} \left( u_{\rm y} + v_{\rm y} \right) + r_{\rm z} \left( u_{\rm z} + v_{\rm z} \right) = \big[ \left( r_{\rm x} u_{\rm x} \right) + \left( r_{\rm y} u_{\rm y} \right) + \left( r_{\rm z} u_{\rm z} \right) \big] + \big[ \left( r_{\rm x} v_{\rm x} \right) + \left( r_{\rm y} v_{\rm y} \right) + \left( r_{\rm z} v_{\rm z} \right) \big] = \vec{r} \bullet \vec{u} + \vec{r} \bullet \vec{v}$.

(b) $\dfrac{d}{dt} \left(\vec{r} \bullet \vec{s} \right) = \dfrac{d}{dt} \left[ \left( r_{\rm x} s_{\rm x} \right) + \ldots \right] = \left[ \left( \dfrac{dr_{\rm x}}{dt}\ s_{\rm x} + r_{\rm x} \dfrac{ds_{\rm x}}{dt} \right) + \ldots \right] = \dfrac{d \vec{r}}{dt} \bullet \vec{s} + \vec{r} \bullet \dfrac{d \vec{s}}{dt}$.

1.9

In [16]:
Image(filename='HW1_Fig1p9.jpg', width=300)
Out[16]:

$\vec{c} \equiv \left( \vec{a} - \vec{b} \right)$, so $c^2 = \left( \vec{a} - \vec{b} \right)^2 = \left( \vec{a} - \vec{b} \right) \bullet \left( \vec{a} - \vec{b} \right) = a^2 + b^2 - 2 a b \cos(\theta)$

1.10

Taking $\vec{r}(t) = \hat{x}\ R \cos(\omega t) + \hat{y}\ R \sin(\omega t)$. You can see that the radial distance is a constant: $r = \sqrt{\vec{r} \bullet \vec{r}} = \sqrt{ \left[ \hat{x}\ R \cos(\omega t) + \hat{y}\ R \sin(\omega t) \right] \bullet \left[ \hat{x}\ R \cos(\omega t) + \hat{y}\ R \sin(\omega t) \right]} = \sqrt{ R^2 \left[ \cos(\omega t)^2 + \sin(\omega t)^2 \right] } = R$. The x and y components oscillate sinusoidally, $90^\circ$ out of phase with another with the x component equal to $R$ and the y projection equal zero at $t = 0$. Then $y$ increases and $x$ decreases as time goes forward -- that's counter-clockwise circular motion. The animation below shows how circular motion looks projected onto the x- and y-axes.

In [17]:
Nframes = 100
# First set up the figure, the axis, and the plot element we want to animate
fig = plt.figure(figsize=(6,6))

rad = 0.5
# ax = fig.add_subplot(111, xlim=(-2.*rad, 2.*rad), ylim=(-2.*rad, 2.*rad), aspect='equal')
ax = plt.subplot2grid((3,3), (0,0), colspan=2, rowspan=2, 
                      xlim=(-2.*rad, 2.*rad), ylim=(-2.*rad, 2.*rad), aspect='equal')
circ = plt.Circle((0, 0), radius=rad, facecolor="None", edgecolor='k', lw=4)
ax.add_patch(circ)
ax.grid(False)
ax.axis('off')
circle, = ax.plot([], [], marker='o', ms=10)

#ax1 = fig.add_subplot(212, ylim=(0, 2.*np.pi), xlim=(-2.*rad, 2.*rad))
ax1 = plt.subplot2grid((3,3), (2,0), colspan=2, ylim=(0, 2.*np.pi), xlim=(-2.*rad, 2.*rad), sharex=ax)
ax1.tick_params(axis='both', which='major', labelsize=10)
ax1.set_ylabel('time', fontsize=12)
ax1.set_xlabel('x position', fontsize=12)
x_pos_marker, = ax1.plot([], [], marker='o', ms=10, color='b')
x_pos_line, = ax1.plot([], [], color='k')

#ax2 = fig.add_subplot(122, xlim=(0, 2.*np.pi), ylim=(-2.*rad, 2.*rad))
ax2 = plt.subplot2grid((3,3), (0,2), rowspan=2, xlim=(0, 2.*np.pi), ylim=(-2.*rad, 2.*rad), sharey=ax)
ax2.yaxis.tick_right()
ax2.yaxis.set_label_position("right")
ax2.tick_params(axis='both', which='major', labelsize=10)
ax2.set_xlabel('time', fontsize=12)
ax2.set_ylabel('y position', fontsize=12)
y_pos_marker, = ax2.plot([], [], marker='o', ms=10, color='b')
y_pos_line, = ax2.plot([], [], color='k')

# initialization function: plot the background of each frame
def init():
    circle.set_data([], [])
    x_pos_marker.set_data([], [])
    y_pos_marker.set_data([], [])
    x_pos_line.set_data([], [])
    y_pos_line.set_data([], [])
    return circle, x_pos_marker, y_pos_marker, x_pos_line, y_pos_line

# This function moves the polygons as a function of the frame i
def animate(i):
    t = 2.*np.pi*float(i/(Nframes - 1.))
    x_marker = rad*np.cos(t)
    y_marker = rad*np.sin(t)
    circle.set_data(x_marker, y_marker)
    x_pos_marker.set_data(x_marker, t)
    y_pos_marker.set_data(t, y_marker)
    
    all_t = np.linspace(0, 2.*np.pi, Nframes)
    x = rad*np.cos(all_t)
    y = rad*np.sin(all_t)
    x_pos_line.set_data(x, all_t)
    y_pos_line.set_data(all_t, y)

    return circle, x_pos_marker, y_pos_marker, x_pos_line, y_pos_line
  
# call the animator.  blit=True means only re-draw the parts that have changed.
anim = animation.FuncAnimation(fig, animate, init_func=init,
                               frames=Nframes, interval=20, blit=True)

# call our new function to display the animation
display_animation(anim)
Out[17]:


Once Loop Reflect

The velocity $\vec{v}$ is given by $\vec{v} = \dfrac{d\vec{r}}{dt} = -\hat{x}\ \omega R \sin(\omega t) + \hat{y}\ \omega R \cos(\omega t)$, and the acceleration $\vec{a} = \dfrac{d\vec{v}}{dt} = -\hat{x}\ \omega^2 R \cos(\omega t) - \hat{y}\ \omega^2 R \sin(\omega t)$.

The magnitude of the acceleration is $|\vec{a}| = \sqrt{ \left[ -\hat{x}\ \omega^2 R \cos(\omega t) - \hat{y}\ \omega^2 R \sin(\omega t) \right] \bullet \left[ -\hat{x}\ \omega^2 R \cos(\omega t) - \hat{y}\ \omega^2 R \sin(\omega t) \right]} = \omega^2 R$.

Regarding the direction of the acceleration, we can see that, at some instant $t$, the x- and y-components of $\vec{a}$ have the same magnitudes relative to one another as the x- and y-components of $\vec{r}$ -- $x$ is $\cos$, and $y$ is $\sin$. However, the components $\vec{a}$ point in the opposite directions as the components of $\vec{r}$, $-\hat{x}$ and $-\hat{y}$. Therefore, $\vec{a}$ points radially inward toward the origin.

These results are totally consistent with uniform circular motion, for which the acceleration is constant in magnitude and points toward the center of the circle.

1.13

Expressed in a Cartesian coordinate system, $\vec{b} = b_{\rm x}\hat{x} + b_{\rm y}\hat{y} + b_{\rm z}\hat{z}$ and a similar definition for $\vec{u}$, with $|\vec{u}| = u = 1$.

$\left( \vec{u} \bullet \vec{b} \right)^2 = \big[ u b \cos(\theta) \big]^2 = b^2 \cos^2(\theta)$.

$\left( \vec{u} \times \vec{b} \right)^2 = \big[ u b \sin(\theta) \big]^2 = b^2 \sin^2(\theta)$.

Thus, $\left( \vec{u} \bullet \vec{b} \right)^2 + \left( \vec{u} \times \vec{b} \right)^2 = b^2 \cos^2(\theta) + b^2 \sin^2(\theta) = b^2$.

In words, $\left( \vec{u} \bullet \vec{b} \right)$ represents the component of $\vec{b}$ that runs parallel to $\vec{u}$, while $\left( \vec{u} \times \vec{b} \right)$ represents the orthogonal component, i.e. the rest of $\vec{b}$. By adding together the squared magnitudes for both these terms, we're collecting the total length (squared) of $\vec{b}$.

1.17

a) Defining $\vec{q} \equiv \left( \vec{u} + \vec{v} \right)$ and $\vec{p} \equiv \vec{r} \times \vec{q}$, we'll just consider the x-component. The other components will come out exactly the same.

$\left( \vec{r} \times \vec{q} \right)_{\rm x} = p_{\rm x} = r_{\rm y} q_{\rm z} - r_{\rm z} q_{\rm y} = r_{\rm y} \left( u_{\rm z} + v_{\rm z} \right) - r_{\rm z} \left( u_{\rm y} + v_{\rm y} \right) = \left( r_{\rm y} u_{\rm z} - r_{\rm z} u_{\rm y} \right) + \left( r_{\rm y} v_{\rm z} - r_{\rm z} v_{\rm y} \right) = \left( \vec{r} \times \vec{u} \right)_{\rm x} + \left( \vec{r} \times \vec{v} \right)_{\rm x}$.

b) Again, thinking about just the x-component:

$\dfrac{d}{dt} \left( \vec{r} \times \vec{s} \right)_{\rm x} = \dfrac{d}{dt} \left( r_{\rm y} s_{\rm z} - r_{\rm z} s_{\rm y}\right) = \dfrac{dr_{\rm y}}{dt} s_{\rm z} + r_{\rm y} \dfrac{ds_{\rm z}}{dt} - \dfrac{dr_{\rm z}}{dt} s_{\rm y} - r_{\rm z} \dfrac{ds_{\rm y}}{dt} = \left( r_{\rm y} \dfrac{ds_{\rm z}}{dt} - r_{\rm z} \dfrac{ds_{\rm y}}{dt} \right) + \left( \dfrac{dr_{\rm y}}{dt} s_{\rm z} - \dfrac{dr_{\rm z}}{dt} s_{\rm y} \right) = \left( \vec{r} \times \dfrac{d\vec{s}}{dt} \right)_{\rm x} + \left( \dfrac{d\vec{r}}{dt} \times \vec{s} \right)_{\rm x}$.

1.19

Keep in mind that $\vec{v} = \dot{\vec{r}}$ and $\vec{a} = \dot{\vec{v}} = \ddot{\vec{r}}$. $ \dfrac{d}{dt} \big[ \vec{a} \bullet \left( \vec{v} \times \vec{r} \right) \big] = \dot{\vec{a}} \bullet \left( \vec{v} \times \vec{r} \right) + \vec{a} \bullet \dfrac{d}{dt} \left( \vec{v} \times \vec{r} \right) = \dot{\vec{a}} \bullet \left( \vec{v} \times \vec{r} \right) + \vec{a} \bullet \left( \dot{\vec{v}} \times \vec{r} + \vec{v} \times \dot{\vec{r}} \right) = \dot{\vec{a}} \bullet \left( \vec{v} \times \vec{r} \right) + \vec{a} \bullet \left( \vec{a} \times \vec{r} + \vec{v} \times \vec{v} \right) = \\ \dot{\vec{a}} \bullet \left( \vec{v} \times \vec{r} \right) + \vec{a} \bullet \left( \vec{a} \times \vec{r} \right) + \vec{a} \bullet \left( \vec{v} \times \vec{v} \right). $

In the very last expression, the first term is the answer we're looking for. The second term is zero because $\vec{a} \times \vec{r}$ produces a vector orthogonal to $\vec{a}$, and so the dot product with $\vec{a}$ is zero. The third term is zero because crossing a vector with itself always gives zero.

1.23

We're given (i) $\vec{b} \bullet \vec{v} = \lambda$, and (ii) $\vec{b} \times \vec{v} = \vec{c}$, and we're told to find $\vec{v}$ in terms of $\lambda$, $\vec{b}$, and $\vec{c}$.

The back of the book gives us the "BAC minus CAB" rule:
$\vec{A} \times \left( \vec{B} \times \vec{C} \right) = \vec{B} \left( \vec{A} \bullet \vec{C} \right) - \vec{C} \left( \vec{A} \bullet \vec{B} \right)$. Make sure you're clear on what the right-hand side of the equation means: $\vec{B} \left( \vec{A} \bullet \vec{C} \right)$ means take the dot product between $\vec{A}$ and $\vec{C}$, a scalar, and multiply it by the vector $\vec{B}$, producing a vector.

Using this rule: $\vec{b} \times \vec{c} = \vec{b} \times \left( \vec{b} \times \vec{v} \right) = \vec{b} \left( \vec{b} \bullet \vec{v} \right) - \vec{v} \left( \vec{b} \bullet \vec{b} \right) = \lambda \vec{b} - b^2\ \vec{v} \Rightarrow \boxed{ \vec{v} = b^{-2} \left( \lambda \vec{b} - \vec{b} \times \vec{c} \right) }$.

*1.24

$\dfrac{df}{dt} = f(t)$, so $f(t) = ?$.

I'll use a different solution from the one suggested by the textbook just to give you an alternative approach.

$-f + \dfrac{df}{dt} = 0$; Multiply both sides by $e^{-t}$, an integrating factor. $\rightarrow -fe^{-t} + \dfrac{df}{dt}e^{-t} = 0$.

By the product rule, $-fe^{-t} + \dfrac{df}{dt}e^{-t} = \dfrac{d}{dt} \left( f e^{-t} \right) = 0$.

So $f e^{-t} = k$, where $k$ is some constant. $\Rightarrow \boxed{f(t) = k e^t}$.

Let's take the book's suggestion: $\dfrac{df}{dt} = f(t) \rightarrow \dfrac{df}{f} = dt$.

Integrating both sides: $\int \dfrac{df}{f} = \int dt \rightarrow \ln(f/f_0) = t$. Remember that $\ln(\ldots)$ is the natural log.

Solving for $f$: $f(t) = f_0 e^t$, and we can see that the constant $f_0$ is the value of the function $f(t)$ when $t = 0$, same as the constant $k$.

1.25

$\dfrac{df}{dt} = -3f(t) \rightarrow \dfrac{df}{f} = -3 dt \rightarrow \boxed{f(t) = f_0e^{-3t}}$.

1.26

In [18]:
fig = plt.figure(figsize=(8,4))

ax1 = fig.add_subplot(121)
draw_coordinate_axes(ax1, dimensions=2)
circ = plt.Circle((0, 0), radius=0.1, fc='gold')
ax1.add_patch(circ)
ax1.annotate(s='', xy=(0,0.5), xytext=(0, 0), arrowprops=dict(facecolor='gold', width=5, frac=0.25))
ax1.text(-0.75, 0.25, '$\\vec{v}_{\\rm puck}$', fontsize=24)
ax1.text(-0.25, -0.25, 'S', fontsize=24)

draw_coordinate_axes(ax1, dimensions=2, origin=(0.5, 0), size=1.5, axis_label="^\prime", color='blue')
ax1.text(0.5, 0.5, 'S$^\prime$', fontsize=24, color='blue')
ax1.annotate(s='', xy=(1, 0.4), xytext=(0.5, 0.4), arrowprops=dict(facecolor='blue', width=5, frac=0.25))
ax1.text(1, 0.4, '$\\vec{V}_{\\rm S^\prime}$', fontsize=24)

ax2 = fig.add_subplot(122)
draw_coordinate_axes(ax2, dimensions=2)
circ = plt.Circle((0, 0), radius=0.1, fc='gold')
ax2.add_patch(circ)
ax2.annotate(s='', xy=(0,0.5), xytext=(0, 0), arrowprops=dict(facecolor='gold', width=5, frac=0.25))
ax2.text(-0.75, 0.25, '$\\vec{v}_{\\rm puck}$', fontsize=24)
ax2.text(-0.25, -0.25, 'S', fontsize=24)

draw_coordinate_axes(ax2, dimensions=2, origin=(0.5, 0), size=1.5, axis_label="^{\prime \prime}", color='red')
ax2.text(0.5, 0.5, 'S$^{\prime \prime}$', fontsize=24, color='red')
ax2.annotate(s='', xy=(1, 0.4), xytext=(0.5, 0.4), arrowprops=dict(facecolor='red', width=5, frac=0.25))
ax2.text(1, 0.4, '$\\vec{A}_{\\rm S^{\prime \prime}}$', fontsize=24)
Out[18]:
<matplotlib.text.Text at 0x109d24a50>

a.) In the inertial frame $S$, Newton's law applies in a simple way: $0 = \vec{F} = m \vec{a} = m \ddot{\vec{r}}$.

$\vec{r} = x \hat{x} + y \hat{y}, \dot{\vec{r}} = \dot{x} \hat{x} + \dot{y} \hat{y} = \vec{v}_{\rm puck} \hat{y}$, and $\ddot{\vec{r}} = \dfrac{dv_{\rm puck}}{dt} \hat{y} = \vec{F}/m = 0$.

$\Rightarrow \boxed{\vec{r}(t) = v_{\rm puck} t\ \hat{y}}$.

b.) Next consider frame $S^\prime$. Define the vector $\vec{R}^\prime(t)$ to point from the origin of $S^\prime$ to the origin of $S$: $\vec{R}^\prime(t) = -\vec{V}_{S^\prime} t = -V_{S^\prime} t\ \hat{x}$, where $\hat{x}$ is a unit vector defined in frame $S$, NOT in frame $S^\prime$.

Keeping track of which coordinate system's unit vectors you're using is really important. In this case, both $\hat{x}$ and $\hat{x}^\prime$ always point along the same direction, i.e. $\hat{x} = \hat{x}^\prime$, but if one coordinate system were rotating relative to the other, that wouldn't be true.

Now let's define the position of the puck as seen from $S^\prime$ as $\boxed{ \vec{r}^\prime(t) = \vec{R}^\prime(t) + \vec{r}(t) = -V_{S^\prime} t\ \hat{x} + v_{\rm puck} t\ \hat{y} }$. This result means that, as viewed from $S^\prime$, the puck moves up and to the left -- exactly what you'd expect intuitively.

*c.) Finally, consider frame $S^{\prime \prime}$. This one is accelerating relative to $S$ with an acceleration $\vec{A}_{S^{\prime \prime}} = A_{S^{\prime \prime}} \hat{x}$. We're writing the acceleration vector in terms of the coordinate vectors for $S$, NOT in terms of the coordinate vectors for $S^{\prime \prime}$ because, of course, $S^{\prime \prime}$ is not accelerating relative to itself.

Define $\vec{R}^{\prime \prime}(t)$ as a vector that points from the origin of $S^{\prime \prime}$ to the origin of $S$. We know that $S^{\prime \prime}$ experiences a uniform, constant acceleration relative to $S$, meaning $\ddot{\vec{R}}^{\prime \prime} = -A_{S^{\prime \prime}} = {\rm const}$. Integrating twice gives the position vector as a function of time: $\vec{R}^{\prime \prime}(t) = -\frac{1}{2} A_{S^{\prime \prime}} t^2 \hat{x}$. Now you can why I chose a negative sign for $\ddot{\vec{R}}^{\prime \prime}$: $\vec{R}^{\prime \prime}(t)$ points in the negative $\hat{x}$-direction.

Now I can to write the position of the puck from $S^{\prime \prime}$: $\vec{r}^{\prime \prime}(t) = \vec{r}(t) + \vec{R}^{\prime \prime}(t) = -\frac{1}{2} A_{S^{\prime \prime}} t^2 \hat{x} + v_{\rm puck} t\ \hat{y} $. Again, the puck appears to have velocity components in the x- and y-directions.

Also, because $S^{\prime \prime}$ is accelerating relative to the inertial frames $S$ and $S^{\prime}$, Newton's laws don't hold in a simple. That is, even though someone riding in frame $S^{\prime \prime}$ doesn't see any forces being applied to the puck, it still appears to accelerate: $\vec{F} = 0$, but $m \ddot{\vec{r}}^{\prime \prime} = -A_{S^{\prime \prime}} \ne 0$.

In fact, if you were in an accelerating reference frame but didn't know it, you could figure out that you were accelerating by tracking the motions of objects in space. If you could tell they appeared to be accelerating in mysterious ways, you could use that as a clue that you were in an accelerating reference frame. By the way, you ARE in a non-inertial frame: the surface of the Earth is rotating, so we DO see such mysterious (non-inertial) accelerations.

The animation below compares how the puck appears to move in each of the three frames we discussed.

In [19]:
Nframes = 100
fig = plt.figure(figsize=(12,4))

ax1 = fig.add_subplot(131)
draw_coordinate_axes(ax1, dimensions=2)
frame_S, = ax1.plot([], [], marker='o', ms=20, color='gold')
frame_S_traj, = ax1.plot([], [], color='gold', zorder=1)

ax2 = fig.add_subplot(132)
draw_coordinate_axes(ax2, dimensions=2, color='blue')
frame_Sprime, = ax2.plot([], [], marker='o', ms=20, color='gold')
frame_Sprime_traj, = ax2.plot([], [], color='gold')

ax3 = fig.add_subplot(133)
draw_coordinate_axes(ax3, dimensions=2, color='red')
frame_Sprimeprime, = ax3.plot([], [], marker='o', ms=20, color='gold')
frame_Sprimeprime_traj, = ax3.plot([], [], color='gold')

# initialization function: plot the background of each frame
def init():
    frame_S.set_data([], [])
    frame_Sprime.set_data([], [])
    frame_Sprimeprime.set_data([], [])    
    
    frame_S_traj.set_data([], [])
    frame_Sprime_traj.set_data([], [])
    frame_Sprimeprime_traj.set_data([], [])    

    return frame_S, frame_Sprime, frame_Sprimeprime, frame_S_traj, frame_Sprime_traj, frame_Sprimeprime_traj

# This function moves the polygons as a function of the frame i
def animate(i):
    t = float(i)/Nframes
    all_t = np.linspace(0, 1, Nframes)
    
    x = 0.
    y = t
    frame_S.set_data(x, y)
    xtraj = 0.
    ytraj = all_t
    frame_S_traj.set_data(xtraj, ytraj)
    
    Vprime = -1
    xprime = Vprime*t
    yprime = t
    frame_Sprime.set_data(xprime, yprime)
    xprime_traj = Vprime*all_t
    yprime_traj = all_t
    frame_Sprime_traj.set_data(xprime_traj, yprime_traj)
    
    Aprimeprime = -1
    xprimeprime = 0.5*Aprimeprime*t**2.
    yprimeprime = t
    frame_Sprimeprime.set_data(xprimeprime, yprimeprime)
    xprimeprime_traj = 0.5*Aprimeprime*all_t**2.
    yprimeprime_traj = all_t
    frame_Sprimeprime_traj.set_data(xprimeprime_traj, yprimeprime_traj)

    return frame_S, frame_Sprime, frame_Sprimeprime, frame_S_traj, frame_Sprime_traj, frame_Sprimeprime_traj
  
# call the animator.  blit=True means only re-draw the parts that have changed.
anim = animation.FuncAnimation(fig, animate, init_func=init,
                               frames=Nframes, interval=10, blit=True)

# call our new function to display the animation
display_animation(anim)
Out[19]:


Once Loop Reflect

1.41

From Eq. (1.48), the radial component of the force is $F_{\rm r} = m \left( \ddot{r} - r \dot{\phi}^2 \right) = -T$, with $T$ the tension in the string. The $\phi$ component is $F_{\rm \phi} = m \left( r \ddot{\phi} + 2 \dot{r} \dot{\phi} \right)$.

We know that $\ddot{\phi} = $ since the mass spins with constant angular velocity $\omega$. Thus, $\dot{\phi} = \omega = {\rm const.}$. The length of the string $R$ is also constant, so $\ddot{r} = \dot{r} = 0$.

So $F_{\rm r} = -m r \dot{\phi}^2 = -m R \omega^2 = -T \Rightarrow \boxed{ T = m R \omega^2 }$.

1.49

In [20]:
Image(filename='HW1_Fig1p49.jpg', width=300)
Out[20]:

The figure above shows the puck at position $\vec{r}$ sandwiched between the two cylinders.

Cylindrical coordinates are just polar coordinates with one, uncoupled coordinate more, $z$, so the location of the puck's center of mass is $\vec{r} = (\rho, \phi, z)$. The direction and length of the unit vector pointing along $z$ don't change, i.e. $d\hat{z}/dt = 0$.

Again, using Eq (1.48), $F_{\rm \rho} = m \left( \ddot{\rho} - \rho \dot{\phi}^2 \right)$. Because the puck is trapped in the radial direction, $\ddot{\rho} = \dot{\rho} = 0$. $\Rightarrow F_{\rm \rho} = -m \rho \dot{\phi}^2$, and this is the normal force exerted by the walls of the cylinders that keeps the puck confined.

$F_{\rm \phi} = m \left( \rho \ddot{\phi} - 2 \dot{\rho} \dot{\phi} \right) = m \rho \ddot{\phi} = 0$ since there are no net torques. Thus $m \rho \dot{\phi} = {\rm const.} = L \Rightarrow \dot{\phi} = L/m \rho \equiv \omega$. Plugging this expression into the $F_{\rm \rho}$ equation gives $F_{\rm \rho} = - m \rho \omega^2$.

Fortunately, since $z$ is uncoupled, the only thing happening in that direction is gravitational acceleration: $F_{\rm z} = -m g = m \ddot{z}$.

Thus,
$ z(t) = -\frac{1}{2} g t^2 + v_{\rm 0} t + z_{\rm 0}, \\ \rho(t) = R ,\\ \phi(t) = \omega t + \phi_{\rm 0} $

If the initial velocity along $z$ were zero but $\omega$ were not, the puck would simply spiral downward between the cylinders.